home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Development Platforms / Macintosh Common Lisp Related / interfaces / PInterface Translator / PInterfaces / Script.p < prev    next >
Encoding:
Text File  |  1993-09-16  |  40.3 KB  |  1,034 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Tuesday, January 15, 1991 at 8:56 AM
  3.     Script.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.         Copyright Apple Computer, Inc.    1986-1990
  7.         All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT Script;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingScript}
  21. {$SETC UsingScript := 1}
  22.  
  23. {$I+}
  24. {$SETC ScriptIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingTypes}
  27. {$I $$Shell(PInterfaces)Types.p}
  28. {$ENDC}
  29. {$IFC UNDEFINED UsingOSUtils}
  30. {$I $$Shell(PInterfaces)OSUtils.p}
  31. {$ENDC}
  32. {$IFC UNDEFINED UsingQuickdraw}
  33. {$I $$Shell(PInterfaces)Quickdraw.p}
  34. {$ENDC}
  35. {$SETC UsingIncludes := ScriptIncludes}
  36.  
  37. CONST
  38.  
  39. { Script System constants }
  40. smSystemScript = -1;                                {designates system script.}
  41. smCurrentScript = -2;                               {designates current font script.}
  42.  
  43. smRoman = 0;                                        {Roman}
  44. smJapanese = 1;                                     {Japanese}
  45. smTradChinese = 2;                                  {Traditional Chinese}
  46. smKorean = 3;                                       {Korean}
  47. smArabic = 4;                                       {Arabic}
  48. smHebrew = 5;                                       {Hebrew}
  49. smGreek = 6;                                        {Greek}
  50. smCyrillic = 7;                                     {Cyrillic}
  51. smRSymbol = 8;                                      {Right-left symbol}
  52. smDevanagari = 9;                                   {Devanagari}
  53. smGurmukhi = 10;                                    {Gurmukhi}
  54. smGujarati = 11;                                    {Gujarati}
  55. smOriya = 12;                                       {Oriya}
  56. smBengali = 13;                                     {Bengali}
  57. smTamil = 14;                                       {Tamil}
  58. smTelugu = 15;                                      {Telugu}
  59. smKannada = 16;                                     {Kannada/Kanarese}
  60. smMalayalam = 17;                                   {Malayalam}
  61. smSinhalese = 18;                                   {Sinhalese}
  62. smBurmese = 19;                                     {Burmese}
  63. smKhmer = 20;                                       {Khmer/Cambodian}
  64. smThai = 21;                                        {Thai}
  65. smLaotian = 22;                                     {Laotian}
  66. smGeorgian = 23;                                    {Georgian}
  67. smArmenian = 24;                                    {Armenian}
  68. smSimpChinese = 25;                                 {Simplified Chinese}
  69. smTibetan = 26;                                     {Tibetan}
  70. smMongolian = 27;                                   {Mongolian}
  71. smGeez = 28;                                        {Geez/Ethiopic}
  72. smEthiopic = 28;                                    {Synonym for smGeez}
  73. smEastEurRoman = 29;                                {Synonym for smSlavic}
  74. smVietnamese = 30;                                  {Vietnamese}
  75. smExtArabic = 31;                                   {extended Arabic}
  76. smUninterp = 32;                                    {uninterpreted symbols, e.g. palette symbols}
  77.  
  78. {Obsolete names for script systems (kept for backward compatibility)}
  79. smChinese = 2;                                      {(use smTradChinese or smSimpChinese)}
  80. smRussian = 7;                                      {(old name for smCyrillic)}
  81.  
  82. { smMaldivian = 25;                                 (no more smMaldivian!)}
  83. smAmharic = 28;                                     {(old name for smGeez)}
  84. smSlavic = 29;                                      {(old name for smEastEurRoman)}
  85. smSindhi = 31;                                      {(old name for smExtArabic)}
  86.  
  87. { Calendar Codes }
  88. calGregorian = 0;
  89. calArabicCivil = 1;
  90. calArabicLunar = 2;
  91. calJapanese = 3;
  92. calJewish = 4;
  93. calCoptic = 5;
  94. calPersian = 6;
  95.  
  96. { Integer Format Codes }
  97. intWestern = 0;
  98. intArabic = 1;
  99. intRoman = 2;
  100. intJapanese = 3;
  101. intEuropean = 4;
  102. intOutputMask = $8000;
  103.  
  104. { CharByte byte types }
  105. smSingleByte = 0;
  106. smFirstByte = -1;
  107. smLastByte = 1;
  108. smMiddleByte = 2;
  109.  
  110. { CharType field masks }
  111. smcTypeMask = $000F;
  112. smcReserved = $00F0;
  113. smcClassMask = $0F00;
  114. smcOrientationMask = $1000;                         {two-byte script glyph orientation}
  115. smcRightMask = $2000;
  116. smcUpperMask = $4000;
  117. smcDoubleMask = $8000;
  118.  
  119. { Basic CharType character types }
  120. smCharPunct = $0000;
  121. smCharAscii = $0001;
  122. smCharEuro = $0007;
  123. smCharExtAscii = $0007;                             { More correct synonym for smCharEuro }
  124.  
  125. { Additional CharType character types for script systems }
  126. smCharKatakana = $0002;                             {Japanese Katakana}
  127. smCharHiragana = $0003;                             {Japanese Hiragana}
  128. smCharIdeographic = $0004;                          {Hanzi, Kanji, Hanja}
  129. smCharTwoByteGreek = $0005;                         {2-byte Greek in Far East systems}
  130. smCharTwoByteRussian = $0006;                       {2-byte Cyrillic in Far East systems}
  131. smCharBidirect = $0008;                             {Arabic/Hebrew}
  132. smCharHangul = $000C;                               {Korean Hangul}
  133. smCharJamo = $000D;                                 {Korean Jamo}
  134.  
  135. { old names for above, for backward compatibility }
  136. smCharFISKana = $0002;                              {Katakana}
  137. smCharFISGana = $0003;                              {Hiragana}
  138. smCharFISIdeo = $0004;                              {Hanzi, Kanji, Hanja}
  139. smCharFISGreek = $0005;                             {2-byte Greek in Far East systems}
  140. smCharFISRussian = $0006;                           {2-byte Cyrillic in Far East systems}
  141.  
  142. { CharType classes for punctuation (smCharPunct) }
  143. smPunctNormal = $0000;
  144. smPunctNumber = $0100;
  145. smPunctSymbol = $0200;
  146. smPunctBlank = $0300;
  147. smPunctRepeat = $0400;                              { FIS: wildcard }
  148. smPunctGraphic = $0500;                             { FIS: line graphics }
  149.  
  150. { CharType classes for FISKana, FISGana }
  151. smKanaSmall = $0100;                                {small kana character}
  152. smKanaHardOK = $0200;                               {can have dakuten}
  153. smKanaSoftOK = $0300;                               {can have dakuten or han-dakuten}
  154.  
  155. { CharType Ideographics classes for two-byte systems }
  156. smIdeographicLevel1 = $0000;                        {level 1 char}
  157. smIdeographicLevel2 = $0100;                        {level 2 char}
  158. smIdeographicUser = $0200;                          {user char}
  159.  
  160. { old names for above, for backward compatibility }
  161. smFISClassLvl1 = $0000;                             {level 1 char}
  162. smFISClassLvl2 = $0100;                             {level 2 char}
  163. smFISClassUser = $0200;                             {user char}
  164.  
  165. { CharType Jamo classes for Korean systems }
  166. smJamoJaeum = $0000;                                {simple consonant char}
  167. smJamoBogJaeum = $0100;                             {complex consonant char}
  168. smJamoMoeum = $0200;                                {simple vowel char}
  169. smJamoBogMoeum = $0300;                             {complex vowel char}
  170.  
  171. { CharType FIS glyph orientation }
  172. smCharHorizontal = $0000;                           { horizontal character form, or for both }
  173. smCharVertical = $1000;                             { vertical character form }
  174.  
  175. { CharType directions }
  176. smCharLeft = $0000;
  177. smCharRight = $2000;
  178.  
  179. { CharType case modifers }
  180. smCharLower = $0000;
  181. smCharUpper = $4000;
  182.  
  183. { CharType character size modifiers (1 or multiple bytes). }
  184. smChar1byte = $0000;
  185. smChar2byte = $8000;
  186.  
  187. { Char2Pixel directions }
  188. smLeftCaret = 0;                                    {Place caret for left block}
  189. smRightCaret = -1;                                  {Place caret for right block}
  190. smHilite = 1;                                       {Direction is TESysJust}
  191.  
  192. { Transliterate target types for Roman }
  193. smTransAscii = 0;
  194. smTransNative = 1;
  195. smTransCase = $FE;
  196. smTransSystem = $FF;                                {convert to system script}
  197.  
  198. { Transliterate target types for FIS }
  199. smTransAscii1 = 2;                                  {1-byte Roman}
  200. smTransAscii2 = 3;                                  {2-byte Roman}
  201. smTransKana1 = 4;                                   {1-byte Japanese Katakana}
  202. smTransKana2 = 5;                                   {2-byte Japanese Katakana}
  203. smTransGana2 = 7;                                   {2-byte Japanese Hiragana (no 1-byte Hiragana)}
  204. smTransHangul2 = 8;                                 {2-byte Korean Hangul}
  205. smTransJamo2 = 9;                                   {2-byte Korean Jamo}
  206. smTransBopomofo2 = 10;                              {2-byte Chinese Bopomofo}
  207.  
  208. { Transliterate target modifiers }
  209. smTransLower = $4000;
  210. smTransUpper = $8000;
  211.  
  212. { Transliterate source mask - general }
  213. smMaskAll = $FFFFFFFF;                              {Convert all text}
  214.  
  215. { Transliterate source masks }
  216. smMaskAscii = $00000001;                            {2^smTransAscii}
  217. smMaskNative = $00000002;                           {2^smTransNative}
  218.  
  219. { Transliterate source masks for FIS }
  220. smMaskAscii1 = $00000004;                           {2^smTransAscii1}
  221. smMaskAscii2 = $00000008;                           {2^smTransAscii2}
  222. smMaskKana1 = $00000010;                            {2^smTransKana1}
  223. smMaskKana2 = $00000020;                            {2^smTransKana2}
  224. smMaskGana2 = $00000080;                            {2^smTransGana2}
  225. smMaskHangul2 = $00000100;                          {2^smTransHangul2}
  226. smMaskJamo2 = $00000200;                            {2^smTransJamo2}
  227. smMaskBopomofo2 = $00000400;                        {2^smTransBopomofo2}
  228.  
  229. { Result values from GetEnvirons, SetEnvirons, GetScript and SetScript calls. }
  230. smNotInstalled = 0;                                 {routine not available in script}
  231. smBadVerb = -1;                                     {Bad verb passed to a routine}
  232. smBadScript = -2;                                   {Bad script code passed to a routine}
  233.  
  234. { Values for script redraw flag. }
  235. smRedrawChar = 0;                                   {Redraw character only}
  236. smRedrawWord = 1;                                   {Redraw entire word (2-byte systems)}
  237. smRedrawLine = -1;                                  {Redraw entire line (bidirectional systems)}
  238.  
  239. { GetEnvirons and SetEnvirons verbs }
  240. smVersion = 0;                                      {Environment version number}
  241. smMunged = 2;                                       {Globals change count}
  242. smEnabled = 4;                                      {Environment enabled flag}
  243. smBidirect = 6;                                     {At least on bidirect script}
  244. smFontForce = 8;                                    {Force font flag}
  245. smIntlForce = 10;                                   {Force intl flag}
  246. smForced = 12;                                      {script forced to system script}
  247. smDefault = 14;                                     {script defaulted to Roman script}
  248. smPrint = 16;                                       {Printer action routine}
  249. smSysScript = 18;                                   {System script}
  250. smLastScript = 20;                                  {Last keyboard script}
  251. smKeyScript = 22;                                   {Keyboard script}
  252. smSysRef = 24;                                      {System folder refNum}
  253. smKeyCache = 26;                                    {Keyboard table cache pointer}
  254. smKeySwap = 28;                                     {Swapping table pointer}
  255. smGenFlags = 30;                                    {General flags long}
  256. smOverride = 32;                                    {Script override flags}
  257. smCharPortion = 34;                                 {Ch vs SpExtra proportion}
  258.  
  259. { New for System 7.0: }
  260. smDoubleByte = 36;                                  {Flag for double-byte script installed}
  261. smKCHRCache = 38;                                   {Returns pointer to KCHR cache}
  262. smRegionCode = 40;                                  {Returns current region code (verXxx)}
  263.  
  264. { GetScript and SetScript verbs.
  265. Note: Verbs private to script systems are negative, while
  266. those general across script systems are non-negative. }
  267. smScriptVersion = 0;                                {Script software version}
  268. smScriptMunged = 2;                                 {Script entry changed count}
  269. smScriptEnabled = 4;                                {Script enabled flag}
  270. smScriptRight = 6;                                  {Right to left flag}
  271. smScriptJust = 8;                                   {Justification flag}
  272. smScriptRedraw = 10;                                {Word redraw flag}
  273. smScriptSysFond = 12;                               {Preferred system font}
  274. smScriptAppFond = 14;                               {Preferred Application font}
  275. smScriptBundle = 16;                                {Beginning of itlb verbs}
  276. smScriptNumber = 16;                                {Script itl0 id}
  277. smScriptDate = 18;                                  {Script itl1 id}
  278. smScriptSort = 20;                                  {Script itl2 id}
  279. smScriptFlags = 22;                                 {flags word}
  280. smScriptToken = 24;                                 {Script itl4 id}
  281. smScriptEncoding = 26;                              {id of optional itl5, if present}
  282. smScriptLang = 28;                                  {Current language for script}
  283. smScriptNumDate = 30;                               {Script KCHR id}
  284. smScriptKeys = 32;                                  {Script KEYC id from dictionary}
  285. smScriptIcon = 34;                                  {ID # of SICN or kcs#/kcs4/kcs8 suite}
  286. smScriptPrint = 36;                                 {Script printer action routine}
  287. smScriptTrap = 38;                                  {Trap entry pointer}
  288. smScriptCreator = 40;                               {Script file creator}
  289. smScriptFile = 42;                                  {Script file name}
  290. smScriptName = 44;                                  {Script name}
  291.  
  292. { There is a hole here for old Kanji private verbs 46-76 
  293.  
  294.  New for System 7.0: }
  295. smScriptMonoFondSize = 78;                          {default monospace FOND (hi) & size (lo)}
  296. smScriptPrefFondSize = 80;                          {preferred FOND (hi) & size (lo)}
  297. smScriptSmallFondSize = 82;                         {default small FOND (hi) & size (lo)}
  298. smScriptSysFondSize = 84;                           {default system FOND (hi) & size (lo)}
  299. smScriptAppFondSize = 86;                           {default app FOND (hi) & size (lo)}
  300. smScriptHelpFondSize = 88;                          {default Help Mgr FOND (hi) & size (lo)}
  301. smScriptValidStyles = 90;                           {mask of valid styles for script}
  302. smScriptAliasStyle = 92;                            {style (set) to use for aliases}
  303.  
  304. { Negative verbs for KeyScript }
  305. smKeyNextScript = -1;                               { Switch to next available script }
  306. smKeySysScript = -2;                                { Switch to the system script }
  307. smKeySwapScript = -3;                               { Switch to previously-used script }
  308.  
  309. { New for System 7.0: }
  310. smKeyNextKybd = -4;                                 { Switch to next keyboard in current script }
  311. smKeySwapKybd = -5;                                 { Switch to previously-used keyboard in current keyscript }
  312.  
  313. smKeyDisableKybds = -6;                             { Disable keyboards not in system or Roman script }
  314. smKeyEnableKybds = -7;                              { Re-enable keyboards for all enabled scripts }
  315. smKeyToggleInline = -8;                             { Toggle inline input for current keyscript }
  316. smKeyToggleDirection = -9;                          { Toggle default line direction (TESysJust) }
  317. smKeyNextInputMethod = -10;                         { Switch to next input method in current keyscript }
  318. smKeySwapInputMethod = -11;                         { Switch to last-used input method in current keyscript }
  319.  
  320. smKeyDisableKybdSwitch = -12;                       { Disable switching from the current keyboard }
  321.  
  322.  
  323. { Bits in the smScriptFlags word
  324. (bits above 7 are non-static) }
  325. smsfIntellCP = 0;                                   {script has intellegent cut & paste}
  326. smsfSingByte = 1;                                   {script has only single bytes}
  327. smsfNatCase = 2;                                    {native chars have upper & lower case}
  328. smsfContext = 3;                                    {contextual script (e.g. AIS-based)}
  329. smsfNoForceFont = 4;                                {Will not force characters}
  330. smsfB0Digits = 5;                                   {Has alternate digits at B0-B9}
  331. smsfAutoInit = 6;                                   {auto initialize the script}
  332. smsfForms = 13;                                     {Uses contextual forms for letters}
  333. smsfLigatures = 14;                                 {Uses contextual ligatures}
  334. smsfReverse = 15;                                   {Reverses native text, right-left}
  335.  
  336. { Bits in the smGenFlags long.
  337. First (high-order) byte is set from itlc flags byte. }
  338. smfShowIcon = 31;                                   {Show icon even if only one script}
  339. smfDualCaret = 30;                                  {Use dual caret for mixed direction text}
  340. smfNameTagEnab = 29;                                {Reserved for internal use}
  341.  
  342. { Roman script constants 
  343.  
  344.  The following are here for backward compatibility, but should not be used. 
  345.  This information should be obtained using GetScript. }
  346. romanSysFond = $3FFF;                               {system font id number}
  347. romanAppFond = 3;                                   {application font id number}
  348. romanFlags = $0007;                                 {roman settings}
  349.  
  350. { Script Manager font equates. }
  351. smFondStart = $4000;                                {start from 16K}
  352. smFondEnd = $C000;                                  {past end of range at 48K}
  353.  
  354. { Miscellaneous font equates. }
  355. smUprHalfCharSet = $80;                             {first char code in top half of std char set}
  356.  
  357. { Character Set Extensions }
  358. diaeresisUprY = $D9;
  359. fraction = $DA;
  360. intlCurrency = $DB;
  361. leftSingGuillemet = $DC;
  362. rightSingGuillemet = $DD;
  363. fiLigature = $DE;
  364. flLigature = $DF;
  365. dblDagger = $E0;
  366. centeredDot = $E1;
  367. baseSingQuote = $E2;
  368. baseDblQuote = $E3;
  369. perThousand = $E4;
  370. circumflexUprA = $E5;
  371. circumflexUprE = $E6;
  372. acuteUprA = $E7;
  373. diaeresisUprE = $E8;
  374. graveUprE = $E9;
  375. acuteUprI = $EA;
  376. circumflexUprI = $EB;
  377. diaeresisUprI = $EC;
  378. graveUprI = $ED;
  379. acuteUprO = $EE;
  380. circumflexUprO = $EF;
  381. appleLogo = $F0;
  382. graveUprO = $F1;
  383. acuteUprU = $F2;
  384. circumflexUprU = $F3;
  385. graveUprU = $F4;
  386. dotlessLwrI = $F5;
  387. circumflex = $F6;
  388. tilde = $F7;
  389. macron = $F8;
  390. breveMark = $F9;
  391. overDot = $FA;
  392. ringMark = $FB;
  393. cedilla = $FC;
  394. doubleAcute = $FD;
  395. ogonek = $FE;
  396. hachek = $FF;
  397.  
  398. { String2Date status values }
  399. fatalDateTime = $8000;
  400. longDateFound = 1;
  401. leftOverChars = 2;
  402. sepNotIntlSep = 4;
  403. fieldOrderNotIntl = 8;
  404. extraneousStrings = 16;
  405. tooManySeps = 32;
  406. sepNotConsistent = 64;
  407. tokenErr = $8100;
  408. cantReadUtilities = $8200;
  409. dateTimeNotFound = $8400;
  410. dateTimeInvalid = $8800;
  411.  
  412. { TokenType values }
  413. tokenIntl = 4;                                      {the itl resource number of the tokenizer}
  414. tokenEmpty = -1;
  415. tokenUnknown = 0;
  416. tokenWhite = 1;
  417. tokenLeftLit = 2;
  418. tokenRightLit = 3;
  419. tokenAlpha = 4;
  420. tokenNumeric = 5;
  421. tokenNewLine = 6;
  422. tokenLeftComment = 7;
  423. tokenRightComment = 8;
  424. tokenLiteral = 9;
  425. tokenEscape = 10;
  426. tokenAltNum = 11;
  427. tokenRealNum = 12;
  428. tokenAltReal = 13;
  429. tokenReserve1 = 14;
  430. tokenReserve2 = 15;
  431. tokenLeftParen = 16;
  432. tokenRightParen = 17;
  433. tokenLeftBracket = 18;
  434. tokenRightBracket = 19;
  435. tokenLeftCurly = 20;
  436. tokenRightCurly = 21;
  437. tokenLeftEnclose = 22;
  438. tokenRightEnclose = 23;
  439. tokenPlus = 24;
  440. tokenMinus = 25;
  441. tokenAsterisk = 26;
  442. tokenDivide = 27;
  443. tokenPlusMinus = 28;
  444. tokenSlash = 29;
  445. tokenBackSlash = 30;
  446. tokenLess = 31;
  447. tokenGreat = 32;
  448. tokenEqual = 33;
  449. tokenLessEqual2 = 34;
  450. tokenLessEqual1 = 35;
  451. tokenGreatEqual2 = 36;
  452. tokenGreatEqual1 = 37;
  453. token2Equal = 38;
  454. tokenColonEqual = 39;
  455. tokenNotEqual = 40;
  456. tokenLessGreat = 41;
  457. tokenExclamEqual = 42;
  458. tokenExclam = 43;
  459. tokenTilde = 44;
  460. tokenComma = 45;
  461. tokenPeriod = 46;
  462. tokenLeft2Quote = 47;
  463. tokenRight2Quote = 48;
  464. tokenLeft1Quote = 49;
  465. tokenRight1Quote = 50;
  466. token2Quote = 51;
  467. token1Quote = 52;
  468. tokenSemicolon = 53;
  469. tokenPercent = 54;
  470. tokenCaret = 55;
  471. tokenUnderline = 56;
  472. tokenAmpersand = 57;
  473. tokenAtSign = 58;
  474. tokenBar = 59;
  475. tokenQuestion = 60;
  476. tokenPi = 61;
  477. tokenRoot = 62;
  478. tokenSigma = 63;
  479. tokenIntegral = 64;
  480. tokenMicro = 65;
  481. tokenCapPi = 66;
  482. tokenInfinity = 67;
  483. tokenColon = 68;
  484. tokenHash = 69;
  485. tokenDollar = 70;
  486. tokenNoBreakSpace = 71;
  487. tokenFraction = 72;
  488. tokenIntlCurrency = 73;
  489. tokenLeftSingGuillemet = 74;
  490. tokenRightSingGuillemet = 75;
  491. tokenPerThousand = 76;
  492. tokenEllipsis = 77;
  493. tokenCenterDot = 78;
  494. tokenNil = 127;
  495. delimPad = -2;
  496.  
  497. { obsolete, misspelled token names kept for backward compatibility }
  498. tokenTilda = 44;
  499. tokenCarat = 55;
  500.  
  501. { the NumberParts indices }
  502. tokLeftQuote = 1;
  503. tokRightQuote = 2;
  504. tokLeadPlacer = 3;
  505. tokLeader = 4;
  506. tokNonLeader = 5;
  507. tokZeroLead = 6;
  508. tokPercent = 7;
  509. tokPlusSign = 8;
  510. tokMinusSign = 9;
  511. tokThousands = 10;
  512. tokSeparator = 12;                                  {11 is a reserved field}
  513. tokEscape = 13;
  514. tokDecPoint = 14;
  515. tokEPlus = 15;
  516. tokEMinus = 16;
  517. tokMaxSymbols = 31;
  518. curNumberPartsVersion = 1;                          {current version of NumberParts record}
  519. fVNumber = 0;                                       {first version of NumFormatString}
  520.  
  521. { Date equates }
  522. smallDateBit = 31;                                  {Restrict valid date/time to range of Time global}
  523. togChar12HourBit = 30;                              {If toggling hour by char, accept hours 1..12 only}
  524. togCharZCycleBit = 29;                              {Modifier for togChar12HourBit: accept hours 0..11 only}
  525. togDelta12HourBit = 28;                             {If toggling hour up/down, restrict to 12-hour range (am/pm)}
  526. genCdevRangeBit = 27;                               {Restrict date/time to range used by genl CDEV}
  527. validDateFields = -1;
  528. maxDateField = 10;
  529. eraMask = $0001;
  530. yearMask = $0002;
  531. monthMask = $0004;
  532. dayMask = $0008;
  533. hourMask = $0010;
  534. minuteMask = $0020;
  535. secondMask = $0040;
  536. dayOfWeekMask = $0080;
  537. dayOfYearMask = $0100;
  538. weekOfYearMask = $0200;
  539. pmMask = $0400;
  540. dateStdMask = $007F;
  541.  
  542. { Toggle results }
  543. toggleUndefined = 0;
  544. toggleOK = 1;
  545. toggleBadField = 2;
  546. toggleBadDelta = 3;
  547. toggleBadChar = 4;
  548. toggleUnknown = 5;
  549. toggleBadNum = 6;
  550. toggleOutOfRange = 7;                               {synonym for toggleErr3}
  551. toggleErr3 = 7;
  552. toggleErr4 = 8;
  553. toggleErr5 = 9;
  554.  
  555. { Constants for truncWhere argument in TruncString and TruncText }
  556. smTruncEnd = 0;                                     { Truncate at end }
  557. smTruncMiddle = $4000;                              { Truncate in middle }
  558.  
  559. { Constants for TruncString and TruncText results }
  560. smNotTruncated = 0;                                 { No truncation was necessary }
  561. smTruncated = 1;                                    { Truncation performed }
  562. smTruncErr = -1;                                    { General error }
  563.  
  564. {Constants for styleRunPosition argument in NPortionText, NDrawJust,
  565.  NMeasureJust, NChar2Pixel, and NPixel2Char.}
  566. smOnlyStyleRun = 0;                                 { This is the only style run on the line}
  567. smLeftStyleRun = 1;                                 { This is leftmost of multiple style runs on the line}
  568. smRightStyleRun = 2;                                { This is rightmost of multiple style runs on the line}
  569. smMiddleStyleRun = 3;                               { There are multiple style runs on the line and this
  570.  is neither the leftmost nor the rightmost. }
  571.  
  572. TYPE
  573. TokenResults = (tokenOK,tokenOverflow,stringOverflow,badDelim,badEnding,
  574.     crash);
  575.  
  576. LongDateField = (eraField,yearField,monthField,dayField,hourField,minuteField,
  577.     secondField,dayOfWeekField,dayOfYearField,weekOfYearField,pmField,res1Field,
  578.     res2Field,res3Field);
  579.  
  580. StyledLineBreakCode = (smBreakWord,smBreakChar,smBreakOverflow);
  581.  
  582. FormatClass = (fPositive,fNegative,fZero);
  583.  
  584. FormatResultType = (fFormatOK,fBestGuess,fOutOfSynch,fSpuriousChars,fMissingDelimiter,
  585.     fExtraDecimal,fMissingLiteral,fExtraExp,fFormatOverflow,fFormStrIsNAN,
  586.     fBadPartsTable,fExtraPercent,fExtraSeparator,fEmptyFormatString);
  587.  
  588.  
  589. CharByteTable = PACKED ARRAY [0..255] OF SignedByte;
  590. ToggleResults = INTEGER;
  591.  
  592. BreakTablePtr = ^BreakTable;
  593. BreakTable = RECORD
  594.     charTypes: ARRAY [0..255] OF SignedByte;
  595.     tripleLength: INTEGER;
  596.     triples: ARRAY [0..0] OF INTEGER;
  597.     END;
  598.  
  599. { New NBreakTable for System 7.0: }
  600. NBreakTablePtr = ^NBreakTable;
  601. NBreakTable = RECORD
  602.     flags1: SignedByte;
  603.     flags2: SignedByte;
  604.     version: INTEGER;
  605.     classTableOff: INTEGER;
  606.     auxCTableOff: INTEGER;
  607.     backwdTableOff: INTEGER;
  608.     forwdTableOff: INTEGER;
  609.     doBackup: INTEGER;
  610.     reserved: INTEGER;
  611.     charTypes: ARRAY [0..255] OF SignedByte;
  612.     tables: ARRAY [0..0] OF INTEGER;
  613.     END;
  614.  
  615. OffPair = RECORD
  616.     offFirst: INTEGER;
  617.     offSecond: INTEGER;
  618.     END;
  619.  
  620.  
  621. OffsetTable = ARRAY [0..2] OF OffPair;
  622.  
  623. ItlcRecord = RECORD
  624.     itlcSystem: INTEGER;                            {default system script}
  625.     itlcReserved: INTEGER;                          {reserved}
  626.     itlcFontForce: SignedByte;                      {default font force flag}
  627.     itlcIntlForce: SignedByte;                      {default intl force flag}
  628.     itlcOldKybd: SignedByte;                        {old keyboard}
  629.     itlcFlags: SignedByte;                          {general flags}
  630.     itlcIconOffset: INTEGER;                        {script icon offset}
  631.     itlcIconSide: SignedByte;                       {icon side}
  632.     itlcIconRsvd: SignedByte;                       {rsvd for other icon info}
  633.     itlcRegionCode: INTEGER;                        {preferred verXxx code}
  634.     itlcReserved3: ARRAY [0..33] OF SignedByte;     {for future use}
  635.     END;
  636.  
  637. ItlbRecord = RECORD
  638.     itlbNumber: INTEGER;                            {itl0 id number}
  639.     itlbDate: INTEGER;                              {itl1 id number}
  640.     itlbSort: INTEGER;                              {itl2 id number}
  641.     itlbFlags: INTEGER;                             {Script flags}
  642.     itlbToken: INTEGER;                             {itl4 id number}
  643.     itlbEncoding: INTEGER;                          {itl5 ID # (optional; char encoding)}
  644.     itlbLang: INTEGER;                              {cur language for script }
  645.     itlbNumRep: SignedByte;                         {number representation code}
  646.     itlbDateRep: SignedByte;                        {date representation code }
  647.     itlbKeys: INTEGER;                              {KCHR id number}
  648.     itlbIcon: INTEGER;                              {ID # of SICN or kcs#/kcs4/kcs8 suite.}
  649.     END;
  650.  
  651. { New ItlbExtRecord structure for System 7.0 }
  652. ItlbExtRecord = RECORD
  653.     base: ItlbRecord;                               {un-extended ItlbRecord}
  654.     itlbLocalSize: LONGINT;                         {size of script's local record}
  655.     itlbMonoFond: INTEGER;                          {default monospace FOND ID}
  656.     itlbMonoSize: INTEGER;                          {default monospace font size}
  657.     itlbPrefFond: INTEGER;                          {preferred FOND ID}
  658.     itlbPrefSize: INTEGER;                          {preferred font size}
  659.     itlbSmallFond: INTEGER;                         {default small FOND ID}
  660.     itlbSmallSize: INTEGER;                         {default small font size}
  661.     itlbSysFond: INTEGER;                           {default system FOND ID}
  662.     itlbSysSize: INTEGER;                           {default system font size}
  663.     itlbAppFond: INTEGER;                           {default application FOND ID}
  664.     itlbAppSize: INTEGER;                           {default application font size}
  665.     itlbHelpFond: INTEGER;                          {default Help Mgr FOND ID}
  666.     itlbHelpSize: INTEGER;                          {default Help Mgr font size}
  667.     itlbValidStyles: Style;                         {set of valid styles for script}
  668.     itlbAliasStyle: Style;                          {style (set) to mark aliases}
  669.     END;
  670.  
  671. MachineLocation = RECORD
  672.     latitude: Fract;
  673.     longitude: Fract;
  674.     CASE INTEGER OF
  675.       0:
  676.         (dlsDelta: SignedByte);                     {signed byte; daylight savings delta}
  677.       1:
  678.         (gmtDelta: LONGINT);                        {must mask - see documentation}
  679.     END;
  680.  
  681.  
  682. String2DateStatus = INTEGER;
  683. TokenType = INTEGER;
  684. DelimType = ARRAY [0..1] OF TokenType;
  685. CommentType = ARRAY [0..3] OF TokenType;
  686.  
  687. TokenRecPtr = ^TokenRec;
  688. TokenRec = RECORD
  689.     theToken: TokenType;
  690.     position: Ptr;                                  {pointer into original Source}
  691.     length: LONGINT;                                {length of text in original source}
  692.     stringPosition: StringPtr;                      {Pascal/C string copy of identifier}
  693.     END;
  694.  
  695. TokenBlockPtr = ^TokenBlock;
  696. TokenBlock = RECORD
  697.     source: Ptr;                                    {pointer to stream of characters}
  698.     sourceLength: LONGINT;                          {length of source stream}
  699.     tokenList: Ptr;                                 {pointer to array of tokens}
  700.     tokenLength: LONGINT;                           {maximum length of TokenList}
  701.     tokenCount: LONGINT;                            {number tokens generated by tokenizer}
  702.     stringList: Ptr;                                {pointer to stream of identifiers}
  703.     stringLength: LONGINT;                          {length of string list}
  704.     stringCount: LONGINT;                           {number of bytes currently used}
  705.     doString: BOOLEAN;                              {make strings & put into StringLIst}
  706.     doAppend: BOOLEAN;                              {append to TokenList rather than replace}
  707.     doAlphanumeric: BOOLEAN;                        {identifiers may include numeric}
  708.     doNest: BOOLEAN;                                {do comments nest?}
  709.     leftDelims: ARRAY [0..1] OF TokenType;
  710.     rightDelims: ARRAY [0..1] OF TokenType;
  711.     leftComment: ARRAY [0..3] OF TokenType;
  712.     rightComment: ARRAY [0..3] OF TokenType;
  713.     escapeCode: TokenType;                          {escape symbol code}
  714.     decimalCode: TokenType;
  715.     itlResource: Handle;                            {ptr to itl4 resource of current script}
  716.     reserved: ARRAY [0..7] OF LONGINT;              {must be zero!}
  717.     END;
  718.  
  719. UntokenTablePtr = ^UntokenTable;
  720. UntokenTableHandle = ^UntokenTablePtr;
  721. UntokenTable = RECORD
  722.     len: INTEGER;
  723.     lastToken: INTEGER;
  724.     index: ARRAY [0..255] OF INTEGER;               {index table; last = lastToken}
  725.     END;
  726.  
  727. DateCachePtr = ^DateCacheRecord;
  728. DateCacheRecord = PACKED RECORD
  729.     hidden: ARRAY [0..255] OF INTEGER;              {only for temporary use}
  730.     END;
  731.  
  732.  
  733. LongDateTime = comp;
  734.  
  735. LongDateCvt = RECORD
  736.     CASE INTEGER OF
  737.       0:
  738.         (c: Comp);
  739.       1:
  740.         (lHigh: LONGINT;
  741.         lLow: LONGINT);
  742.     END;
  743.  
  744. LongDateRec = RECORD
  745.     CASE INTEGER OF
  746.       0:
  747.         (era: INTEGER;
  748.         year: INTEGER;
  749.         month: INTEGER;
  750.         day: INTEGER;
  751.         hour: INTEGER;
  752.         minute: INTEGER;
  753.         second: INTEGER;
  754.         dayOfWeek: INTEGER;
  755.         dayOfYear: INTEGER;
  756.         weekOfYear: INTEGER;
  757.         pm: INTEGER;
  758.         res1: INTEGER;
  759.         res2: INTEGER;
  760.         res3: INTEGER);
  761.       1:
  762.         (list: ARRAY [0..13] OF INTEGER);           {Index by LongDateField!}
  763.       2:
  764.         (eraAlt: INTEGER;
  765.         oldDate: DateTimeRec);
  766.     END;
  767.  
  768.  
  769. DateDelta = SignedByte;
  770.  
  771. TogglePB = RECORD
  772.     togFlags: LONGINT;                              {caller normally sets low word to dateStdMask=$7F}
  773.     amChars: ResType;                               {from intl0}
  774.     pmChars: ResType;                               {from intl0}
  775.     reserved: ARRAY [0..3] OF LONGINT;
  776.     END;
  777.  
  778.  
  779. FormatOrder = ARRAY [0..0] OF INTEGER;
  780. FormatOrderPtr = ^FormatOrder;
  781. FormatStatus = INTEGER;
  782.  
  783. WideChar = RECORD
  784.     CASE BOOLEAN OF
  785.       TRUE:
  786.         (a: PACKED ARRAY [0..1] OF CHAR);           {0 is the high order character}
  787.       FALSE:
  788.         (b: INTEGER);
  789.     END;
  790.  
  791. WideCharArr = RECORD
  792.     size: INTEGER;
  793.     data: PACKED ARRAY [0..9] OF WideChar;
  794.     END;
  795.  
  796. NumFormatString = PACKED RECORD
  797.     fLength: Byte;
  798.     fVersion: Byte;
  799.     data: PACKED ARRAY [0..253] OF SignedByte;      {private data}
  800.     END;
  801.  
  802. Itl4Ptr = ^Itl4Rec;
  803. Itl4Handle = ^Itl4Ptr;
  804. Itl4Rec = RECORD
  805.     flags: INTEGER;
  806.     resourceType: LONGINT;
  807.     resourceNum: INTEGER;
  808.     version: INTEGER;
  809.     resHeader1: LONGINT;
  810.     resHeader2: LONGINT;
  811.     numTables: INTEGER;                             {one-based}
  812.     mapOffset: LONGINT;                             {offsets are from record start}
  813.     strOffset: LONGINT;
  814.     fetchOffset: LONGINT;
  815.     unTokenOffset: LONGINT;
  816.     defPartsOffset: LONGINT;
  817.     resOffset6: LONGINT;
  818.     resOffset7: LONGINT;
  819.     resOffset8: LONGINT;
  820.     END;
  821.  
  822. { New NItl4Rec for System 7.0: }
  823. NItl4Ptr = ^NItl4Rec;
  824. NItl4Handle = ^NItl4Ptr;
  825. NItl4Rec = RECORD
  826.     flags: INTEGER;
  827.     resourceType: LONGINT;
  828.     resourceNum: INTEGER;
  829.     version: INTEGER;
  830.     format: INTEGER;
  831.     resHeader: INTEGER;
  832.     resHeader2: LONGINT;
  833.     numTables: INTEGER;                             {one-based}
  834.     mapOffset: LONGINT;                             {offsets are from record start}
  835.     strOffset: LONGINT;
  836.     fetchOffset: LONGINT;
  837.     unTokenOffset: LONGINT;
  838.     defPartsOffset: LONGINT;
  839.     whtSpListOffset: LONGINT;
  840.     resOffset7: LONGINT;
  841.     resOffset8: LONGINT;
  842.     resLength1: INTEGER;
  843.     resLength2: INTEGER;
  844.     resLength3: INTEGER;
  845.     unTokenLength: INTEGER;
  846.     defPartsLength: INTEGER;
  847.     whtSpListLength: INTEGER;
  848.     resLength7: INTEGER;
  849.     resLength8: INTEGER;
  850.     END;
  851.  
  852. NumberPartsPtr = ^NumberParts;
  853. NumberParts = RECORD
  854.     version: INTEGER;
  855.     data: ARRAY [1..31] OF WideChar;                {index by [tokLeftQuote..tokMaxSymbols]}
  856.     pePlus: WideCharArr;
  857.     peMinus: WideCharArr;
  858.     peMinusPlus: WideCharArr;
  859.     altNumTable: WideCharArr;
  860.     reserved: PACKED ARRAY [0..19] OF CHAR;
  861.     END;
  862.  
  863. FVector = RECORD
  864.     start: INTEGER;
  865.     length: INTEGER;
  866.     END;
  867.  
  868.  
  869. TripleInt = ARRAY [0..2] OF FVector;                { index by [fPositive..fZero] }
  870.  
  871. ScriptRunStatus = RECORD
  872.     script: SignedByte;
  873.     variant: SignedByte;
  874.     END;
  875.  
  876.  
  877. { type for truncWhere parameter in new TruncString, TruncText }
  878. TruncCode = INTEGER;
  879.  
  880. { type for styleRunPosition parameter in NPixel2Char etc. }
  881. JustStyleCode = INTEGER;
  882.  
  883. FUNCTION FontScript: INTEGER;
  884.     INLINE $2F3C,$8200,$0000,$A8B5;
  885. FUNCTION IntlScript: INTEGER;
  886.     INLINE $2F3C,$8200,$0002,$A8B5;
  887. PROCEDURE KeyScript(code: INTEGER);
  888.     INLINE $2F3C,$8002,$0004,$A8B5;
  889. FUNCTION Font2Script(fontNumber: INTEGER): INTEGER;
  890.     INLINE $2F3C,$8202,$0006,$A8B5;
  891. FUNCTION GetEnvirons(verb: INTEGER): LONGINT;
  892.     INLINE $2F3C,$8402,$0008,$A8B5;
  893. FUNCTION SetEnvirons(verb: INTEGER;param: LONGINT): OSErr;
  894.     INLINE $2F3C,$8206,$000A,$A8B5;
  895. FUNCTION GetScript(script: INTEGER;verb: INTEGER): LONGINT;
  896.     INLINE $2F3C,$8404,$000C,$A8B5;
  897. FUNCTION SetScript(script: INTEGER;verb: INTEGER;param: LONGINT): OSErr;
  898.     INLINE $2F3C,$8208,$000E,$A8B5;
  899. FUNCTION CharByte(textBuf: Ptr;textOffset: INTEGER): INTEGER;
  900.     INLINE $2F3C,$8206,$0010,$A8B5;
  901. FUNCTION CharType(textBuf: Ptr;textOffset: INTEGER): INTEGER;
  902.     INLINE $2F3C,$8206,$0012,$A8B5;
  903. FUNCTION Pixel2Char(textBuf: Ptr;textLen: INTEGER;slop: INTEGER;pixelWidth: INTEGER;
  904.     VAR leadingEdge: BOOLEAN): INTEGER;
  905.     INLINE $2F3C,$820E,$0014,$A8B5;
  906. FUNCTION Char2Pixel(textBuf: Ptr;textLen: INTEGER;slop: INTEGER;offset: INTEGER;
  907.     direction: INTEGER): INTEGER;
  908.     INLINE $2F3C,$820C,$0016,$A8B5;
  909. FUNCTION Transliterate(srcHandle: Handle;dstHandle: Handle;target: INTEGER;
  910.     srcMask: LONGINT): OSErr;
  911.     INLINE $2F3C,$820E,$0018,$A8B5;
  912. PROCEDURE FindWord(textPtr: Ptr;textLength: INTEGER;offset: INTEGER;leadingEdge: BOOLEAN;
  913.     breaks: BreakTablePtr;VAR offsets: OffsetTable);
  914.     INLINE $2F3C,$8012,$001A,$A8B5;
  915. PROCEDURE HiliteText(textPtr: Ptr;textLength: INTEGER;firstOffset: INTEGER;
  916.     secondOffset: INTEGER;VAR offsets: OffsetTable);
  917.     INLINE $2F3C,$800E,$001C,$A8B5;
  918. PROCEDURE DrawJust(textPtr: Ptr;textLength: INTEGER;slop: INTEGER);
  919.     INLINE $2F3C,$8008,$001E,$A8B5;
  920. PROCEDURE MeasureJust(textPtr: Ptr;textLength: INTEGER;slop: INTEGER;charLocs: Ptr);
  921.     INLINE $2F3C,$800C,$0020,$A8B5;
  922. FUNCTION ParseTable(VAR table: CharByteTable): BOOLEAN;
  923.     INLINE $2F3C,$8204,$0022,$A8B5;
  924. FUNCTION GetDefFontSize: INTEGER;
  925.     INLINE $3EB8,$0BA8,$6604,$3EBC,$000C;
  926. FUNCTION GetSysFont: INTEGER;
  927.     INLINE $3EB8,$0BA6;
  928. FUNCTION GetAppFont: INTEGER;
  929.     INLINE $3EB8,$0984;
  930. FUNCTION GetMBarHeight: INTEGER;
  931.     INLINE $3EB8,$0BAA;
  932. FUNCTION GetSysJust: INTEGER;
  933.     INLINE $3EB8,$0BAC;
  934. PROCEDURE SetSysJust(newJust: INTEGER);
  935.     INLINE $31DF,$0BAC;
  936. PROCEDURE ReadLocation(VAR loc: MachineLocation);
  937.     INLINE $205F,$203C,$000C,$00E4,$A051;
  938. PROCEDURE WriteLocation(loc: MachineLocation);
  939.     INLINE $205F,$203C,$000C,$00E4,$A052;
  940. PROCEDURE UprText(textPtr: Ptr;len: INTEGER);
  941.     INLINE $301F,$205F,$A054;
  942. PROCEDURE LwrText(textPtr: Ptr;len: INTEGER);
  943.     INLINE $301F,$205F,$A056;
  944.  
  945.  
  946. {  New for 7.0  }
  947. PROCEDURE LowerText(textPtr: Ptr;len: INTEGER);
  948.     INLINE $301F,$205F,$A056;
  949. PROCEDURE StripText(textPtr: Ptr;len: INTEGER);
  950.     INLINE $301F,$205F,$A256;
  951. PROCEDURE UpperText(textPtr: Ptr;len: INTEGER);
  952.     INLINE $301F,$205F,$A456;
  953. PROCEDURE StripUpperText(textPtr: Ptr;len: INTEGER);
  954.     INLINE $301F,$205F,$A656;
  955.  
  956. FUNCTION StyledLineBreak(textPtr: Ptr;textLen: LONGINT;textStart: LONGINT;
  957.     textEnd: LONGINT;flags: LONGINT;VAR textWidth: Fixed;VAR textOffset: LONGINT): StyledLineBreakCode;
  958.     INLINE $2F3C,$821C,$FFFE,$A8B5;
  959. PROCEDURE GetFormatOrder(ordering: FormatOrderPtr;firstFormat: INTEGER;
  960.     lastFormat: INTEGER;lineRight: BOOLEAN;rlDirProc: Ptr;dirParam: Ptr);
  961.     INLINE $2F3C,$8012,$FFFC,$A8B5;
  962. FUNCTION IntlTokenize(tokenParam: TokenBlockPtr): TokenResults;
  963.     INLINE $2F3C,$8204,$FFFA,$A8B5;
  964. FUNCTION InitDateCache(theCache: DateCachePtr): OSErr;
  965.     INLINE $2F3C,$8204,$FFF8,$A8B5;
  966. FUNCTION String2Date(textPtr: Ptr;textLen: LONGINT;theCache: DateCachePtr;
  967.     VAR lengthUsed: LONGINT;VAR dateTime: LongDateRec): String2DateStatus;
  968.     INLINE $2F3C,$8214,$FFF6,$A8B5;
  969. FUNCTION String2Time(textPtr: Ptr;textLen: LONGINT;theCache: DateCachePtr;
  970.     VAR lengthUsed: LONGINT;VAR dateTime: LongDateRec): String2DateStatus;
  971.     INLINE $2F3C,$8214,$FFF4,$A8B5;
  972. PROCEDURE LongDate2Secs(lDate: LongDateRec;VAR lSecs: LongDateTime);
  973.     INLINE $2F3C,$8008,$FFF2,$A8B5;
  974. PROCEDURE LongSecs2Date(VAR lSecs: LongDateTime;VAR lDate: LongDateRec);
  975.     INLINE $2F3C,$8008,$FFF0,$A8B5;
  976. FUNCTION ToggleDate(VAR lSecs: LongDateTime;field: LongDateField;delta: DateDelta;
  977.     ch: INTEGER;params: TogglePB): ToggleResults;
  978.     INLINE $2F3C,$820E,$FFEE,$A8B5;
  979. FUNCTION Str2Format(inString: Str255;partsTable: NumberParts;VAR outString: NumFormatString): FormatStatus;
  980.     INLINE $2F3C,$820C,$FFEC,$A8B5;
  981. FUNCTION Format2Str(myCanonical: NumFormatString;partsTable: NumberParts;
  982.     VAR outString: Str255;VAR positions: TripleInt): FormatStatus;
  983.     INLINE $2F3C,$8210,$FFEA,$A8B5;
  984. FUNCTION FormatX2Str(x: extended;myCanonical: NumFormatString;partsTable: NumberParts;
  985.     VAR outString: Str255): FormatStatus;
  986.     INLINE $2F3C,$8210,$FFE8,$A8B5;
  987. FUNCTION FormatStr2X(source: Str255;myCanonical: NumFormatString;partsTable: NumberParts;
  988.     VAR x: extended): FormatStatus;
  989.     INLINE $2F3C,$8210,$FFE6,$A8B5;
  990. FUNCTION PortionText(textPtr: Ptr;textLen: LONGINT): Fixed;
  991.     INLINE $2F3C,$8408,$0024,$A8B5;
  992. FUNCTION FindScriptRun(textPtr: Ptr;textLen: LONGINT;VAR lenUsed: LONGINT): ScriptRunStatus;
  993.     INLINE $2F3C,$820C,$0026,$A8B5;
  994. FUNCTION VisibleLength(textPtr: Ptr;textLen: LONGINT): LONGINT;
  995.     INLINE $2F3C,$8408,$0028,$A8B5;
  996. FUNCTION ValidDate(VAR vDate: LongDateRec;flags: LONGINT;VAR newSecs: LongDateTime): INTEGER;
  997.     INLINE $2F3C,$8204,$FFE4,$A8B5;
  998.  
  999.  
  1000. {  New for 7.0  }
  1001. PROCEDURE NFindWord(textPtr: Ptr;textLength: INTEGER;offset: INTEGER;leadingEdge: BOOLEAN;
  1002.     nbreaks: NBreakTablePtr;VAR offsets: OffsetTable);
  1003.     INLINE $2F3C,$8012,$FFE2,$A8B5;
  1004. FUNCTION TruncString(width: INTEGER;VAR theString: Str255;truncWhere: TruncCode): INTEGER;
  1005.     INLINE $2F3C,$8208,$FFE0,$A8B5;
  1006. FUNCTION TruncText(width: INTEGER;textPtr: Ptr;VAR length: INTEGER;truncWhere: TruncCode): INTEGER;
  1007.     INLINE $2F3C,$820C,$FFDE,$A8B5;
  1008. FUNCTION ReplaceText(baseText: Handle;substitutionText: Handle;key: Str15): INTEGER;
  1009.     INLINE $2F3C,$820C,$FFDC,$A8B5;
  1010. FUNCTION NPixel2Char(textBuf: Ptr;textLen: LONGINT;slop: Fixed;pixelWidth: Fixed;
  1011.     VAR leadingEdge: BOOLEAN;VAR widthRemaining: Fixed;styleRunPosition: JustStyleCode;
  1012.     numer: Point;denom: Point): INTEGER;
  1013.     INLINE $2F3C,$8222,$002E,$A8B5;
  1014. FUNCTION NChar2Pixel(textBuf: Ptr;textLen: LONGINT;slop: Fixed;offset: LONGINT;
  1015.     direction: INTEGER;styleRunPosition: JustStyleCode;numer: Point;denom: Point): INTEGER;
  1016.     INLINE $2F3C,$821C,$0030,$A8B5;
  1017. PROCEDURE NDrawJust(textPtr: Ptr;textLength: LONGINT;slop: Fixed;styleRunPosition: JustStyleCode;
  1018.     numer: Point;denom: Point);
  1019.     INLINE $2F3C,$8016,$0032,$A8B5;
  1020. PROCEDURE NMeasureJust(textPtr: Ptr;textLength: LONGINT;slop: Fixed;charLocs: Ptr;
  1021.     styleRunPosition: JustStyleCode;numer: Point;denom: Point);
  1022.     INLINE $2F3C,$801A,$0034,$A8B5;
  1023. FUNCTION NPortionText(textPtr: Ptr;textLen: LONGINT;styleRunPosition: JustStyleCode;
  1024.     numer: Point;denom: Point): Fixed;
  1025.     INLINE $2F3C,$8412,$0036,$A8B5;
  1026.  
  1027.  
  1028. {$ENDC}    { UsingScript }
  1029.  
  1030. {$IFC NOT UsingIncludes}
  1031.     END.
  1032. {$ENDC}
  1033.  
  1034.